package com.wtwd.device.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author mjy
 * @since 2021-09-02
 */
@ApiModel(value="HeartRateRecord对象", description="")
public class HeartRateRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "心跳记录表主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "设备主键id",required = true)
    private Long deviceId;

    @ApiModelProperty(value = "时间，格式：yyyy-MM-dd",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date time;

    @ApiModelProperty(value = "平均心率",required = true)
    private Integer avgHeartRate;

    @ApiModelProperty(value = "最小心率",required = true)
    private Integer minHeartRate;

    @ApiModelProperty(value = "最大心率",required = true)
    private Integer maxHeartRate;

    @ApiModelProperty(value = "心率时间段记录详情",required = true)
    private List<HeartRateInfo> listHeartRate;

    private String heartRateInfo;

    @ApiModelProperty(value = "上传时间",required = false)
    private long uploadTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getAvgHeartRate() {
        return avgHeartRate;
    }

    public void setAvgHeartRate(Integer avgHeartRate) {
        this.avgHeartRate = avgHeartRate;
    }

    public Integer getMinHeartRate() {
        return minHeartRate;
    }

    public void setMinHeartRate(Integer minHeartRate) {
        this.minHeartRate = minHeartRate;
    }

    public Integer getMaxHeartRate() {
        return maxHeartRate;
    }

    public void setMaxHeartRate(Integer maxHeartRate) {
        this.maxHeartRate = maxHeartRate;
    }

    public List<HeartRateInfo> getListHeartRate() {
        return listHeartRate;
    }

    public void setListHeartRate(List<HeartRateInfo> listHeartRate) {
        this.listHeartRate = listHeartRate;
    }

    public String getHeartRateInfo() {
        return heartRateInfo;
    }

    public void setHeartRateInfo(String heartRateInfo) {
        this.heartRateInfo = heartRateInfo;
    }

    public long getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(long uploadTime) {
        this.uploadTime = uploadTime;
    }

    @Override
    public String toString() {
        return "HeartRateRecord{" +
                "id=" + id +
                ", deviceId=" + deviceId +
                ", time=" + time +
                ", avgHeartRate=" + avgHeartRate +
                ", minHeartRate=" + minHeartRate +
                ", maxHeartRate=" + maxHeartRate +
                ", listHeartRate=" + listHeartRate +
                ", heartRateInfo='" + heartRateInfo + '\'' +
                ", uploadTime=" + uploadTime +
                '}';
    }
}
